package edu.lmu.cs.dhara.roflkode.entities;

import edu.lmu.cs.dhara.util.Log;

/**
 * The roflkode "Loop" statement.
 */
public class LoopStatement extends Statement {
	private String name;
	private LoopControl control;
    private Block body;

    /**
     * Creates a while statement object.
     */
    public LoopStatement(String name, LoopControl control, Block body) {
        this.name = name;
        this.control = control;
        this.body = body;
    }
    
    /**
     * Returns the loop name.
     */
    public String getName() {
        return name;
    }
    
    /**
     * Returns the loop name.
     */
    public LoopControl getControl() {
        return control;
    }

    /**
     * Returns the body.
     */
    public Block getBody() {
        return body;
    }

    /**
     * Analyzes this statement.
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
//        condition.analyze(log, table);
//        condition.assertBoolean("while_condition_not_boolean", log);
//        body.analyze(log, table, f, true);
    }
}
